package com.yukh.test.hibernate.ex1;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;


@Entity
@Table(name="t_user_info")
public class Student implements Serializable{
	private static final long serialVersionUID = 1L;
	
	private Integer stuId;
	private String stuName;
	private String stuSex;
	private String stuPhone;
	private String stuAddress;
	private String stuAge;
	private String stuEmail;
	private Date createTime;
	
	@Id
	@Column(name="userId")
	@TableGenerator(
			name="key_store",
			table="generator_table_id",
			pkColumnName="g_key",
			pkColumnValue="stu_info_id",
			valueColumnName="g_value",
			allocationSize=1
	)
	@GeneratedValue(strategy=GenerationType.TABLE, generator="key_store")
	public Integer getStuId() {
		return stuId;
	}
	public void setStuId(Integer stuId) {
		this.stuId = stuId;
	}
	@Column(name="userName")
	public String getStuName() {
		return stuName;
	}
	public void setStuName(String stuName) {
		this.stuName = stuName;
	}
	@Column(name="userSex")
	public String getStuSex() {
		return stuSex;
	}
	public void setStuSex(String stuSex) {
		this.stuSex = stuSex;
	}
	@Column(name="userAge")
	public String getStuAge() {
		return stuAge;
	}
	public void setStuAge(String stuAge) {
		this.stuAge = stuAge;
	}
	@Column(name="userPhone")
	public String getStuPhone() {
		return stuPhone;
	}
	public void setStuPhone(String stuPhone) {
		this.stuPhone = stuPhone;
	}
	@Column(name="userAddress")
	public String getStuAddress() {
		return stuAddress;
	}
	public void setStuAddress(String stuAddress) {
		this.stuAddress = stuAddress;
	}
	@Column(name="userEmail")
	public String getStuEmail() {
		return stuEmail;
	}
	public void setStuEmail(String stuEmail) {
		this.stuEmail = stuEmail;
	}
	@Column(name="createTime")
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
}
